-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
44 lines (36 loc) · 824 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
using namespace std;
int main() {
int A, B, C, temp;
cin >> A >> B >> C;
if(A < B){
temp = A;
A = B;
B = temp;
}
if(B < C){
temp = B;
B = C;
C = temp;
}
if(A < B){
temp = A;
A = B;
B = temp;
}
if(A + B > C and A + C > B and B + C > A){
if(A == B and B == C)
cout << "Valido-Equilatero" << endl;
else if(A == B or B == C)
cout << "Valido-Isoceles" << endl;
else if(A != B and B != C and C != A)
cout << "Valido-Escaleno" << endl;
if(A * A == B * B + C * C)
cout << "Retangulo: S" << endl;
else
cout << "Retangulo: N" << endl;
}
else
cout << "Invalido" << endl;
return 0;
}